#pragma once
#include <IMotion.h>
#include <IRotation.h>
#include <IGameObject.h>
#include <IVisible.h>
#include <ICollision.h>
#include <IAlivetimer.h>
#include <Entity.h>
#include <Ship.h>
class Bullet : public Entity ,public IAlivetimer
{
private:
    Entity* owner;
    Entity* target;
    real attack = 0;
    real errorAngle;
    bool tracking = true;
    Vector2 trackingOffset=Vector2();
    Vector2 trackingPosition;
public:
    Bullet(/* args */) = default;
    ~Bullet();

    void setOwner(Entity* owner);
    Entity* getOwner();
    void setTarget(Entity* target);
    Entity* getTarget();
    void update(real delta) override;
    Entity *updateCollision(real delta);
    void updateTrackingPosition();
    void setAttack(real val);
    real getAttack();
    void setErrorAngle(real val);
    real getErrorAngle();
    void setTrackingOffset(Vector2 val);
    Vector2 getTrackingOffset();
    std::string birthEffect;
    std::string deathEffect;
};
